<template>
  <div>
    <div>
      <el-radio v-model="radio" label="true">备选项</el-radio>
      <el-radio v-model="radio" label=false>备选项</el-radio>
    </div>
    <div>
      <el-table :data="students" style="width: 100%">
        <el-table-column prop="sid" label="学号" width="180"> </el-table-column>
        <el-table-column prop="sname" label="姓名" width="180">
        </el-table-column>
        <el-table-column prop="date" label="日期" width="180">
        </el-table-column>
        <el-table-column prop="address" label="地址"> </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      radio: "false",
      students: [],
    };
  },
  created() {
    this.mysave();
    this.getAllStudents();
  },
  methods: {
    mysave(){
        //login----resp
        //将数据存储到流量器中
        // sessionStorage,浏览器关闭清空数据
        // localStorage.setItem("xxx","xxxxxxxxxxxxxxxxxxxx");
    },
    getAllStudents() {
      //前端访问后端，必须在请求头中携带token
      this.$axios.get("http://localhost:8080/student/get/all").then((resp) => {
        this.students = resp.data.data;
      });
    },
  },
};
</script>

<style>
</style>